<template>
  <div class="menu-bar">
    <span @click="openFileMenu" class="menu-bar-item">文件</span>
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue'
import { fileMenuConfig } from '../config/fileMenu.config'
import { createContentMenu } from '@/render/utils/createContentMenu'
export default defineComponent({
  setup() {
    const openFileMenu = (e: Event) => {
      createContentMenu(e, fileMenuConfig)
    }
    return { openFileMenu }
  }
})
</script>

<style scoped>
.menu-bar-item {
  cursor: pointer;
  font-size: 13px;
}
</style>
